<template>
  <div>
    <com-vuex></com-vuex>
    这是index{{this.$store.state.count}}
    <button @click="add">点击</button>
  </div>
</template>

<script>
  import comVuex from '../components/vuex'
  export default {
    name: "index",
    //  上传参数
    data() {
      return {

      }
    },
    components:{
      comVuex
    },
    methods: {
      add(){
        this.$store.commit("increment",900)
      }
    },

  }
</script>

<style scoped>

</style>
